package com.xue.congroller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.xue.bean.SeckillMessage;
import com.xue.mq.MQSender;

@RestController
public class MqController {
	
	@Autowired
	MQSender mq;
	
	@RequestMapping("/getMsg")
	public String getMessage(SeckillMessage msg) {
		System.err.println("***********************mq****************");
		
		mq.sendSeckillMessage(msg);
		return "success";
	}
}
